package io;

import java.io.*;

public class Copy22 {
    public static void main(String[] args) throws IOException {
        File file = new File("skin2.jpg");
        FileInputStream fis = new FileInputStream(file);
        FileOutputStream fos = new FileOutputStream("skin2222.jpg");
        int len;
        byte[] data = new byte[(int)file.length()];
        while ((len=fis.read(data))!=-1){
            fos.write(data,0,len);
        }
        System.out.println("复制完毕");
        fis.close();
        fos.close();
    }
}
